//
//  XMLObject.h
//  pa
//
//  Created by HaiJiao Chen on 12-7-19.
//  Copyright (c) 2012年 __MyCompanyName__. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface XMLObject : NSObject

+ (XMLObject*)parse:(NSData*)data;

- (int)getCount;
- (NSString*)getName;

- (XMLObject*)getXMLObjectForKey:(NSString*)key;
- (XMLObject*)getXMLObjectForIndex:(int)index;

- (NSString*)getStringForKey:(NSString*)key defaultValue:(NSString*)val;
- (NSString*)getStringForIndex:(int)index defaultValue:(NSString*)val;

- (int)getIntForKey:(NSString*)key defaultValue:(int)val;
- (int)getIntForIndex:(int)index defaultValue:(int)val;

- (NSMutableDictionary*)convert2Dictionary;
- (NSMutableArray*)convert2Array;
@end
